package com.imc.beans;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * ClusterInfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "cluster_info", catalog = "imcdbserver", uniqueConstraints = @UniqueConstraint(columnNames = {
		"major_id", "minor_id" }))
public class ClusterInfo implements java.io.Serializable {

	// Fields

	private ClusterInfoId id;

	// Constructors

	/** default constructor */
	public ClusterInfo() {
	}

	/** full constructor */
	public ClusterInfo(ClusterInfoId id) {
		this.id = id;
	}

	// Property accessors
	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "majorId", column = @Column(name = "major_id")),
			@AttributeOverride(name = "minorId", column = @Column(name = "minor_id")),
			@AttributeOverride(name = "ownerId", column = @Column(name = "owner_id")),
			@AttributeOverride(name = "firstClass", column = @Column(name = "first_class")),
			@AttributeOverride(name = "seconClass", column = @Column(name = "secon_class")),
			@AttributeOverride(name = "thirdClass", column = @Column(name = "third_class")),
			@AttributeOverride(name = "title", column = @Column(name = "title", nullable = false, length = 64)),
			@AttributeOverride(name = "note", column = @Column(name = "note", nullable = false, length = 16777215)),
			@AttributeOverride(name = "bulletin", column = @Column(name = "bulletin", nullable = false, length = 16777215)),
			@AttributeOverride(name = "maxMember", column = @Column(name = "max_member", nullable = false)),
			@AttributeOverride(name = "security", column = @Column(name = "security", nullable = false)),
			@AttributeOverride(name = "accessPower", column = @Column(name = "access_power", nullable = false)),
			@AttributeOverride(name = "passwd", column = @Column(name = "passwd", nullable = false, length = 20)),
			@AttributeOverride(name = "createTime", column = @Column(name = "create_time", nullable = false)),
			@AttributeOverride(name = "modifyTime", column = @Column(name = "modify_time", nullable = false)),
			@AttributeOverride(name = "flags", column = @Column(name = "flags", nullable = false)),
			@AttributeOverride(name = "space", column = @Column(name = "space")),
			@AttributeOverride(name = "corpId", column = @Column(name = "corp_id")) })
	public ClusterInfoId getId() {
		return this.id;
	}

	public void setId(ClusterInfoId id) {
		this.id = id;
	}

}